package com.platform.system.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.platform.common.bean.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;

/**
 * describe:角色权限关联表
 *
 * @author rainly
 * @date 2019/12/06
 * @time 2:47 下午
 */
@ApiModel(value = "角色权限关联表", description = "角色权限关联表SysRolePrivilege")
@Data
@TableName(value = "sys_role_privilege")
public class SysRolePrivilege extends BaseEntity<SysRolePrivilege> {

    @ApiModelProperty(value = "id", name = "id", example = "32位uuid", required = true)
    @Id
    @Column(name = "id", length = 32, columnDefinition = "varchar(32) COMMENT '主键'")
    @TableId(type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty(value = "权限id", name = "privilege_id", example = "权限id", required = true)
    @Column(name = "privilege_id", length = 32, columnDefinition = "varchar(100) COMMENT '权限id'")
    private String privilegeId;

    @ApiModelProperty(value = "角色id", name = "role_id", example = "角色id", required = true)
    @Column(name = "role_id", length = 32, columnDefinition = "varchar(32) COMMENT '角色id'")
    private String roleId;

    @ApiModelProperty(value = "标记", name = "flag", example = "标记(diabale 删除 unable 正常)", required = true)
    @Column(name = "flag", length = 20, columnDefinition = "varchar(20) COMMENT '标记(diabale 删除 unable 正常)'")
    @TableField(fill = FieldFill.INSERT)
    private String flag;
}
